package com.xx.ch05.demo.dmeo14;

import com.xx.ch05.demo.demo01.dao.UserDao;
import com.xx.ch05.demo.demo01.entity.User;
import com.xx.ch05.demo.demo01.service.UserService;

public class UserServiceImp implements UserService {
    /**
     * 用户业务，实现对User功能的业务管理
     */
    private UserDao userDao;
    /**
     * 保存用户
     */
    @Override
    public void save(User user) {
        //调用用户DAO的方法保存用户信息
        userDao.save(user);
    }
    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }
}
